<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	List<TblCheckSchedule> list = (List<TblCheckSchedule>)request.getAttribute("list");
	LeaveForm form = (LeaveForm)request.getAttribute("command");
	Map map = (Map)request.getAttribute("map");
	String username = map.get("username")+"";
	String startdate = map.get("startDate")+"";
	String enddate = map.get("endDate")+"";
%>
<style>
	.sch-wrap{
		padding:20px;
		position: relative;
	}
	.sch-tb{
		border:1px solid #ccc;
		width:96%;
	}
	.sch-tb td{
		border:1px solid #ccc;
		align:center;
		valign:middle;
		margin:0 auto;
	}
	.cb-td{
		colspan;
	}
</style>
<div class="main">
	<div class="oaTable">
		<div class="sch-wrap">
			<div><span><%=username%></span>&nbsp;&nbsp;&nbsp;<span><%=startdate%></span>至<span><%=enddate%></span></div>
			<table class="sch-tb">
				<tr>
					<td class="cb-td" colspan="1">时间/星期</td>
					<td class="cb-td" colspan="2">上班时间段</td>
				</tr>
				<%
					for(int i=0;i<7;i++){
						String schedule = "";
						String day = "";
						if(i==0){
							schedule = null!=map.get("1")?map.get("1")+"":"";
							day = "星期一";
						}
						if(i==1){
							schedule = null!=map.get("2")?map.get("2")+"":"";
							day = "星期二";
						}
						if(i==2){
							schedule = null!=map.get("3")?map.get("3")+"":"";
							day = "星期三";
						}
						if(i==3){
							schedule = null!=map.get("4")?map.get("4")+"":"";
							day = "星期四";
						}
						if(i==4){
							schedule = null!=map.get("5")?map.get("5")+"":"";
							day = "星期五";
						}
						if(i==5){
							schedule = null!=map.get("6")?map.get("6")+"":"";
							day = "星期六";
						}
						if(i==6){
							schedule = null!=map.get("0")?map.get("0")+"":"";
							day = "星期日";
						}
						%>
							<tr>
								<td colspan="1"><%=day%></td>
								<td colspan="2">
									<div>
										<%
											if(StringUtils.isNotBlank(schedule)){
												for(String s:schedule.split(";")){
													%><div><%=s%></div><%
												}
											}
										%>
									</div>
								</td>
							</tr>
						<%
					}
				%>
			</table>
		</div>
	</div>
</div>
<script>
</script>